Skip to main content

All Questions

1vote
2answers
4kviews

Using the same name for setter and gettter methods for a boolean member variable

Say I have class with a boolean member variable fancy: public class MyClass { private boolean fancy; } Case 1. I could the define the setter and getter as follows: // getter public boolean ...
StaticBeagle's user avatar
1vote
2answers
5kviews

SonarQube is complaining about: "Use isEmpty() to check whether the collection is empty or not."

So as my the title says, SonarQube is complaining whenever you use list.size() == 0 or list.size > 0 However I started changing to isEmpty() and !is.Empty() and noticed the code becomes way ...
Arturas M's user avatar

close